package com.slz3.business.module.memberManagement.memShippingAddress.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.memberManagement.memShippingAddress.domain.MemShippingAddress;
import com.slz3.business.module.memberManagement.memShippingAddress.domain.MemShippingAddressCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemShippingAddressResAtomic {

    static Mono<ServerResponse> add_$MemShippingAddressUpdateLock(ServerRequest req, MemShippingAddress memShippingAddress) {
        return MemShippingAddressResSafeValid.add(req, memShippingAddress) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShippingAddressResExecutor.add(req, memShippingAddress);
    }

    public static Mono<ServerResponse> delete_$MemShippingAddressUpdateLock(ServerRequest req, MemShippingAddressCondition memShippingAddressCondition) {
        return MemShippingAddressResSafeValid.delete(req, memShippingAddressCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShippingAddressResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$MemShippingAddressUpdateLock(ServerRequest req, MemShippingAddress memShippingAddress) {
        return MemShippingAddressResSafeValid.modify(req, memShippingAddress) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShippingAddressResExecutor.modify(req, memShippingAddress);
    }

    static Mono<ServerResponse> info_$MemShippingAddressUpdateLock(ServerRequest req) {
        return MemShippingAddressResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShippingAddressResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$MemShippingAddressUpdateLock(ServerRequest req, MemShippingAddressCondition memShippingAddressCondition) {
        return MemShippingAddressResSafeValid.auditSubmit(req, memShippingAddressCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShippingAddressResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$MemShippingAddressUpdateLock(ServerRequest req, MemShippingAddressCondition memShippingAddressCondition) {
        return MemShippingAddressResSafeValid.audit(req, memShippingAddressCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShippingAddressResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$MemShippingAddressUpdateLock(ServerRequest req, MemShippingAddressCondition memShippingAddressCondition) {
        return MemShippingAddressResSafeValid.auditReject(req, memShippingAddressCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShippingAddressResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$MemShippingAddressUpdateLock(ServerRequest req, MemShippingAddressCondition memShippingAddressCondition) {
        return MemShippingAddressResSafeValid.usingEnable(req, memShippingAddressCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShippingAddressResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$MemShippingAddressUpdateLock(ServerRequest req, MemShippingAddressCondition memShippingAddressCondition) {
        return MemShippingAddressResSafeValid.usingDisable(req, memShippingAddressCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MemShippingAddressResExecutor.usingDisable(req);
    }
}
